
export class QueryMeta {
  // TODO support extends
  name: string;
  description: string;
  severity: 'demo' | 'suggestion' | 'info' | 'medium' | 'high' | 'critical' = 'medium';
  message?: string;

  /**
   * Tags of the query, which can be used to filter queries in the UI or CLI.
   *
   * @type {string[]}
   * @memberof QueryMeta
   */
  tags: string[] = [];

  /**
   * The region of the query, which can be used to distinguish between common-query / global-configuration.
   *
   * @type {('query' | 'global')}
   * @memberof QueryMeta
   */
  region: 'query' | 'global' = 'query';

  /**
   * Priority of the query, which can be used to determine the order of execution in ascent order.
   *
   * @type {number}
   * @memberof QueryMeta
   */
  priority: number = 0;

  constructor(init?: Partial<QueryMeta>) {
    Object.assign(this, init);
  }

  toString(): string {
    return this.name;
  }
}
